package com.aaa.sso.service;

import com.aaa.common.bo.User;
import com.aaa.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Xiujie Yu
 * @Date 2021-01-21
 * @Time 17:02
 */
@FeignClient("systemService")
public interface RemoteUserService {

    /**
     * 功能描述:根据用户名获取用户信息
     * @param userName String
     * @return com.aaa.common.util.Result
     */
    @GetMapping("/user/getUserByUserName")
    Result<User> getUserByUserName(@RequestParam("userName") String userName);

    @PutMapping("/user/update")
    public Result<User> update(@RequestBody User user);
}
